<?php

declare(strict_types=1);

namespace ImiApp\ApiServer\Api\Model\Base;

use Imi\Config\Annotation\ConfigValue;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Entity;
use Imi\Model\Annotation\Table;
use ImiApp\ImiServer\AbstractModel as Model;

/**
 * 运营中心激励金 基类.
 *
 * @Entity(camel=false, bean=true, incrUpdate=false)
 * @Table(name=@ConfigValue(name="@app.models.ImiApp\ApiServer\Api\Model\RunExciteMoney.name", default="fa_run_excite_money"), usePrefix=false, id={"id"}, dbPoolName=@ConfigValue(name="@app.models.ImiApp\ApiServer\Api\Model\RunExciteMoney.poolName"))
 * @DDL(sql="CREATE TABLE `fa_run_excite_money` (
  `id` int(10) unsigned NOT NULL,
  `run_id` int(10) unsigned DEFAULT NULL COMMENT '运营中心',
  `money` decimal(10,2) DEFAULT NULL COMMENT '激励金',
  `date` varchar(10) DEFAULT NULL COMMENT '月份',
  `year` varchar(4) DEFAULT NULL COMMENT '年',
  `m` varchar(2) DEFAULT NULL COMMENT '月',
  `status` enum('1','2') DEFAULT '1' COMMENT '状态:1=待发放,2=已发放',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='运营中心激励金'", decode="")
 *
 * @property int|null $id 
 * @property int|null $runId 运营中心
 * @property string|float|int|null $money 激励金
 * @property string|null $date 月份
 * @property string|null $year 年
 * @property string|null $m 月
 * @property string|null $status 状态:1=待发放,2=已发放
 */
abstract class RunExciteMoneyBase extends Model
{
    /**
     * {@inheritdoc}
     */
    public const PRIMARY_KEY = 'id';

    /**
     * {@inheritdoc}
     */
    public const PRIMARY_KEYS = ["id"];

    /**
     * id.
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=false, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $id = NULL;

    /**
     * 获取 id.
     *
     * @return int|null
     */
    public function getId(): ?int
    {
        return $this->id;
    }

    /**
     * 赋值 id.
     * @param int|null $id id
     * @return static
     */
    public function setId($id)
    {
        $this->id = null === $id ? null : (int)$id;
        return $this;
    }

    /**
     * 运营中心.
     * run_id
     * @Column(name="run_id", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $runId = NULL;

    /**
     * 获取 runId - 运营中心.
     *
     * @return int|null
     */
    public function getRunId(): ?int
    {
        return $this->runId;
    }

    /**
     * 赋值 runId - 运营中心.
     * @param int|null $runId run_id
     * @return static
     */
    public function setRunId($runId)
    {
        $this->runId = null === $runId ? null : (int)$runId;
        return $this;
    }

    /**
     * 激励金.
     * money
     * @Column(name="money", type="decimal", length=10, accuracy=2, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $money = NULL;

    /**
     * 获取 money - 激励金.
     *
     * @return string|float|int|null
     */
    public function getMoney()
    {
        return $this->money;
    }

    /**
     * 赋值 money - 激励金.
     * @param string|float|int|null $money money
     * @return static
     */
    public function setMoney($money)
    {
        $this->money = null === $money ? null : $money;
        return $this;
    }

    /**
     * 月份.
     * date
     * @Column(name="date", type="varchar", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $date = NULL;

    /**
     * 获取 date - 月份.
     *
     * @return string|null
     */
    public function getDate(): ?string
    {
        return $this->date;
    }

    /**
     * 赋值 date - 月份.
     * @param string|null $date date
     * @return static
     */
    public function setDate($date)
    {
        $this->date = null === $date ? null : (string)$date;
        return $this;
    }

    /**
     * 年.
     * year
     * @Column(name="year", type="varchar", length=4, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $year = NULL;

    /**
     * 获取 year - 年.
     *
     * @return string|null
     */
    public function getYear(): ?string
    {
        return $this->year;
    }

    /**
     * 赋值 year - 年.
     * @param string|null $year year
     * @return static
     */
    public function setYear($year)
    {
        $this->year = null === $year ? null : (string)$year;
        return $this;
    }

    /**
     * 月.
     * m
     * @Column(name="m", type="varchar", length=2, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $m = NULL;

    /**
     * 获取 m - 月.
     *
     * @return string|null
     */
    public function getM(): ?string
    {
        return $this->m;
    }

    /**
     * 赋值 m - 月.
     * @param string|null $m m
     * @return static
     */
    public function setM($m)
    {
        $this->m = null === $m ? null : (string)$m;
        return $this;
    }

    /**
     * 状态:1=待发放,2=已发放.
     * status
     * @Column(name="status", type="enum", length=0, accuracy=0, nullable=true, default="1", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $status = '1';

    /**
     * 获取 status - 状态:1=待发放,2=已发放.
     *
     * @return string|null
     */
    public function getStatus(): ?string
    {
        return $this->status;
    }

    /**
     * 赋值 status - 状态:1=待发放,2=已发放.
     * @param string|null $status status
     * @return static
     */
    public function setStatus($status)
    {
        $this->status = null === $status ? null : (string)$status;
        return $this;
    }

}
